Auto-remove hash from hex code
Add missing semi-colons
Remove DOM reaccess for every time element is needed
Remove need to pass 'type' as it can be automatically detected