Break up functions better