implement client side functionality and other minor modification.