Started implementing quaternions, general cleanup