Bugfixes and tabs2space convertion
Resolved merge conflict