Removed some duplicate functions