Refactored a bit, made .jar friendly, added .jar.