Implemented custom constructor and some basic functions