Cleanup, simplification of implementation