pgobjects + testing frame functional, see #1
refactoring
added sql.R, closing #1