Added comments and cleanup for submit