Added sources to IntelliJ Idea project. Added JUnit tests