Start to clean up backend code