Added typecasts, constructor chaining

Also it makes sure non-void functions return a value.
Super constructors have to be called appropriately.