Refactor end points

Refactored endpoint code in Xpages plugin. Updated SBT app