Created general package and structure, minor refactoring