numerous minor changes made, better working framwork in mind