A Framework for Dexterous Manipulation using Lie Algebras