Refactoring, and some small corrections