Final Version. Part of GUI added.