Some more code that's making things way too complicated