Adding controllers, improving signing function