Clean-up + modifications for using IntelliJ as main IDE

As in title, works fine for me; should work for everybody.
Notice: actually is used Maven for fetching the JavaMail library, so your IntelliJ (or whatever) should have Maven support. That's all folks! Tested on Community IntelliJ (free and open-source, so get it now!).