Bug fixes and added classes