Removed useless code
Added documentation inline and fixed submit on form click