Reformat code with IntelliJ configuration and javadocs
Add Locale API
Fix Javadoc formattings
Also change the other factory methods for consistency