Various refactoring, added python placeholder regex