Finish Main Functionality