Removing duplicate code~ish