changes and bug fixes based on Sean feedback
changes and bug fixes based on Sean feedback