Cleaned up boilerplate code