Cleaned up ceation of beanstemc objects.