Made changes to support easier initialization from spring