Updated some conventions and fixed a small bug