Fix relative import statements
Separate scripts module functions
Code formatting changes