Clean implementation by splitting into 2 files