Remove leading spaces before code & remove trailing whitespace.