I think I might have finally gotten this program working, albeit with an extremely basic hash function.