Added CAS integration and more layout work