Initial work on stud. Needs QA.