Updated labeling and cleaner code