Code simplification & cleanup