Slight code refactoring. Fixed anon generation.