Added stack and stack tests. Also did some more stuff in some other files.