Remove hard coded paths
Replacing hard-coded paths in middle_layer with the helper function get_middle_layer. These changes that were wrapped up in the IntelliJ debugging and CAPO changes in a previous MR (now closed).
Replacing hard-coded paths in middle_layer with the helper function get_middle_layer. These changes that were wrapped up in the IntelliJ debugging and CAPO changes in a previous MR (now closed).