Finished. Debugging needed.