Converted into IntelliJ idea Project

Also did some code cleanup