Moved unit test to actual unit test, fixed resource leaks, verified announce functionality.