huge update adding lots of functionality, and some master detail layouts