Adds lots of code I forgot to commit