Cleanup code, remove trailing spaces