Style improvements and old code removal