Better coding practices applied