Standarizing and fixing some bugs.