Refactor into individual files
merge changes