Total rewrite to support Userbin version 1