Switching to new coding style and beginning refactoring