Code compiled. Fixed some errors