Added gui packages, refactorings of code.