Adding support for spaces, sizing window to content.