refactoring and cleanup
fixed some defaults and further refactoring to bean passing