DEVFORUM-38: Code clean up. Now works. Need to improve documentation. /Sara.