Made tons of changes and things seem to be working pretty well now