moved to maven, fixed some bugs resulting from maven