Refactored a bit. Added jquery ui (injected).