Added Copyright notice and some refactoring

Refactored Pilavt to StackS.