Slight refactor and structure changes