Some cleaning up and code reuse