Refactored code, scales relative to dimensions, style moved to CSS