refac(lib/*): add/remove semicolons, etc..

Removing duplicate declarations of variables, add semicolon where needed, etc..