Finished some most functionality