Added PATCH route to routes plus some clean up in api