Refactor. Use latest stuff from cloudly.
SWP