Add Classes (incomplete) support. Add some library utils. Fix bugs.