Relocated release logic into release class
Cleaning up code