Added new beans, and made some changes to error handling