Switching to new coding style and beginning refactoring
finished refacotoring