bootstrapping and cleaning up code