Added get() method and some bug fixes