Removing boilerplate code