agressive restructuring of mainactivity.  About halfway done. Added new
.java file for dealing with files.