Realign code and header files, remove typo