Made the main type classes final to prevent them being extended by plugin authors.