Fixing the resizing problem. Still needs work on the resizing the width correctly.