Reorganizing code structure a little