Major refactoring into separate packages.
Deleted old versions of files.