Main form psuedocode...need to prettyfy