Refactoring done - it's building! But there are some crashes