Various small fixes and refactoring. Added toastr notification lib.