fix styles and wrong var for state, add comment parse fn