Still refactoring code