extract main body from spa - separate into views