Improving format of source code and improving tests