Cleanup code
Simplify code