Adjusted init method so it will not run more than once
Added a lot more full support for inheritance