Some additions and tweaking