removed test functions, added comments.