Cleaned up more behind the scenes, less hackish