Added tests and fixes whitespaces