Fixed bug with methods not returning their values.
Added real tests.