Made work, mostly finished code.