Added Useful Code to Main Class