added rendering on screen functionality, code cleanup, added public_api methods visible to outside programs