Revamped Plugin, added maxlength