Cleaned constructor code