Pretty good working version. Need to expand testing though.