API improved. Some conditionals were modified