Added prototype implementation of constructor