Made work in an external jar file, removed unnecessary dependencies