button and main

this is the bulk of main, and button is near finished