Added labels and fixed broken code