added common library snippets; removed extra comments;