Partially complete refactor
Update to cleaner format / syntax