Fixed compiler warnings and implemented hlint suggestions on source
files