All but Q5-Part4 finalized

cleaned up code and added headers