Revert c0879907d5 and trim whitespace for 'list' types

As suggested