Finished most implementation