huge bunch of changes