Cleaning up code and starting Mail plugin