Finished with small bugs and comments