Added new functions, changed style