further code orginization, library usage notes