refactoring, repackaging and code improvements!