adding forms docs
optimize some forms code