Updated and scrapped previous iterations.