Refactor, remove unneeded bits