Fixed errors and now compiles