Cleaned code after merging