refactored project structur and added segment manager