Fixed all compile-time errors