Things I learned rewriting a project from scratch