get main code back to compile with properties etc. - tests not done yet