CleanUP and seperated code from admin.api.js
Merge pull request #134 from Juniper/cleanup

CleanUP and seperated code from admin.api.js