Basic code improvements