Added initial test and constructor function