Modified constructor
Pulled from dev. Merged conflicts