code structuring cleanup