IntelliJ version 12.2 reformat on file save

How to set reformat and remove unused imports upon file save( Ctrl + S) in IntelliJ version 12.2?