All the boilerplate stuff I should really have a better way of doing