Cleanup templates
Cleanup js code
Fixed ststus text
Added proto function for simplify code