cleaned up and finish signature related functions; mruby might be faster development