added preview handeling, started messing with page loading stuff