---
tags: Sequencer-dungeon-spec
---
[toc]
# Optimizate the implementation
Up until now, we implement everything inside a single file `lib.rs`. We can split this file into specific modules as follows:
## Modules
a. Items:`item.rs`
b. Map: `map.rs`
c. Player: `player.rs`
d. Player actions: `player_actions.rs`
e. State: `state.rs`
f. Storage
`storage.rs` contains all the paths define in durable storage. Define functions for `load_state` and `update_state`.
g. Lib
`lib.rs` only contains the `entry` function.