Fixed a bug and organized