Removed rendering artifacts and added support for resizing