Still working on refactoring code to make it more usable