Add Apache License Version 2
Move to maven and refactor code