Cleaned up code and added command line options

 * Refactored the shake rules
 * Separated the shake rules for shared src, vs own project src