Fixed some bugs and indent to 4