Added an edit command, added some deferred functionality and did some general cleanup