Fixed all warnings & errors