Improved upon livepreview stuff