Singularity Relocation and Reduction in Robot Workspaces using Quaternions and Reassembling Transformations