fixed tests and moved some classes into more sensible packages
fixed unit tests