adding unit tests, fixing bugs, implementing flashmessenger for some actions