Added Main Switch for testing each part

Also used code formatter