Added comments section; cleaned up api; removed deprecated functions