Refactor stuff

I couldn't resist and made a pack of refactorings:
* add setUp to tests
* PulsarStatus -> enum
* Formatting
* ASI