removed unused imports, fixed some small bugs with resizing