Refactoring, more browser/OS compatibility