Fixed css being added as attributes and created test function