fixed code warnings and moved a few classes to a new package.