Added signing

Also, fixed compile errors.