Cleanup code: remove unnecessary return statements etc.