Changed stack to use book code (blegh) instead of Java API.