Changed direct values to functions
Added all methods to prototype