Fixed errors and implemented views