Added several packages. Small refactoring to the code structure.