Reformatting: switch to spaces instead of tabs
Refactoring: split code and tests at two files