completed OO refactoring of admin javascript