Just some random code, these should probably be organized in some fashion