Refactor + clean up a littl