Rewrite

Added some programs and changed the API